 
 
import { useRoutes } from "react-router-dom";
// 导入登录
import Login from '../views/Login'

// 导入RouterView
function RouterView() {
  // 路由配置
const routes = [
  {path:"/",element:<Login/>},
  {path:"/admin/*",element:<AdminView/>},
  {path:"*",element:<NoMatch/>}
]
  const element = useRoutes(routes);
  return ( <>{element}</> );
}

export default RouterView;
// function LoginView(){
//   return <div>登录页面</div>
// }
function AdminView(){
  return <div>后台管理页面</div>
}
function NoMatch(){
  return <div>404</div>
}